<template>
<p>{{ msg }}</p>
<button v-on:click="f1">测试1</button><br>
<button @click="f1">测试2</button><br>
<button @click="f2('Hello World')">测试3</button><br>
<input type="text" @input="f3($event.target.value)"><br>
<button @click="msg = 'Hello Vue'">测试4</button>
</template>
<script setup>
import { ref } from 'vue';

const msg = ref("Hello World")
function f1(){
    console.log("正在执行f1方法")
}

function f2(args){
    console.log(args)
}

function f3(args){
    console.log(args)
}
</script>